Computer-aided design (CAD) is use of a computer system to assist user in creation, modification, and analysis of a complex three dimensional (3D) geometric model generally outputted as electronic files for print, machining, or other manufacturing operations. Typically, a design engineer may use CAD software loaded on the computer system to construct a 3D geometric model of a real-world object. For example, the design engineer may create various components of a real-world object using the CAD software and assemble the components into one or more subassemblies. Then, the design engineer may assemble the one or more subassemblies to form a 3D geometric model of the real-world object.
Assembling of the components involves positioning of components in a 3D geometric model and/or creating appropriate constraint relationships (e.g., mating relationships) among different geometrical entities (e.g., face, edge, etc.) of the components in the 3D geometric model. This requires a lot of manual intervention and is typically a tedious process. For example, in order to define constraint relationship for two components, the design engineer inputs geometrical entities of source and target components to be assembled and manually defines type constraint relationship between the entities. Another known technique allows the design engineer to manually pre-define several constraint relationships for multiple geometric entities of components in advance. Accordingly, in real time, the components are automatically constrained if certain conditions are satisfied based on the pre-defined constrained relationships. However, pre-defining constraint relationships ahead of time may be a cumbersome, time consuming task, and error-prone process.